// Copyright (C) ZHENG Zhong <heavyzheng nospam-at gmail D0T com>
// http://www.zhengzhong.net/
//
// $Id$
//

//! \example create_dom_tree.hpp
//! This example creates a DOM tree and prints it.
#include "create_dom_tree.hpp"

//! \example navigate_dom_tree.hpp
//! This example navigates a DOM tree and prints the nodes.
#include "navigate_dom_tree.hpp"

//! \example evaluate_xpath.hpp
//! This example evaluates an XPath expression on an XML document.
#include "evaluate_xpath.hpp"

//! \example parse_by_sax.hpp
//! This example parses an XML document using a SAX parser.
#include "parse_by_sax.hpp"

// Header file containing sample XML strings.
#include "sample_xml.hpp"

////////////////////////////////////////////////////////////////////////////////////////////////////

#include <string>
#include <iostream>

namespace {

    void print_title_(const std::string& title, std::ostream& os) {
        os << std::endl
           << "----------------------------------------------------------------------" << std::endl
           << title << std::endl
           << "----------------------------------------------------------------------" << std::endl
           << std::endl;
    }

} // anonymous namespace

////////////////////////////////////////////////////////////////////////////////////////////////////

int main(int argc, char* argv[]) {

    argc, argv; // remove compiler warnings.

    print_title_("parse_by_sax (no namespace)", std::cout);
    zzheng::example::parse_by_sax(ZZHENG_EXAMPLE_SAMPLE_XML_NO_NS);

    print_title_("parse_by_sax (with namespace)", std::cout);
    zzheng::example::parse_by_sax(ZZHENG_EXAMPLE_SAMPLE_XML_NS);

    //print_title_("create_dom_tree (no namespace)", std::cout);
    //zzheng::example::create_dom_tree_no_ns();

    //print_title_("create_dom_tree (with namespace)", std::cout);
    //zzheng::example::create_dom_tree_ns();

    print_title_("navigate_dom_tree (no namespace)", std::cout);
    zzheng::example::navigate_dom_tree(ZZHENG_EXAMPLE_SAMPLE_XML_NO_NS);

    print_title_("navigate_dom_tree (with namespace)", std::cout);
    zzheng::example::navigate_dom_tree(ZZHENG_EXAMPLE_SAMPLE_XML_NS);

    //print_title_("evaluate_xpath (no namespace)", std::cout);
    //zzheng::example::evaluate_xpath(ZZHENG_EXAMPLE_SAMPLE_XML_NO_NS);

    //print_title_("evaluate_xpath (with namespace)", std::cout);
    //zzheng::example::evaluate_xpath(ZZHENG_EXAMPLE_SAMPLE_XML_NS);

    return 0;
}



